diff options
| author | Adam Soltys <[email protected]> | 2026-02-04 12:42:42 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 15:34:19 -0800 |
| commit | 78c201d8d9d2f3ec07f6ea36201977846e29ccd9 (patch) | |
| tree | 413d697c2cfa9d3e867c791e161183bad958ed86 /src/routes/(app)/payment/[id]/plain | |
| parent | 882c3bd3fd01b6001172c61e0d2227d962254c62 (diff) | |
| download | coinos-ui-78c201d8d9d2f3ec07f6ea36201977846e29ccd9.tar.gz coinos-ui-78c201d8d9d2f3ec07f6ea36201977846e29ccd9.zip | |
homepage design and currency toggling
Diffstat (limited to 'src/routes/(app)/payment/[id]/plain')
| -rw-r--r-- | src/routes/(app)/payment/[id]/plain/+page.svelte | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/routes/(app)/payment/[id]/plain/+page.svelte b/src/routes/(app)/payment/[id]/plain/+page.svelte index 5dc82ce3..8e3fe8f3 100644 --- a/src/routes/(app)/payment/[id]/plain/+page.svelte +++ b/src/routes/(app)/payment/[id]/plain/+page.svelte @@ -14,6 +14,7 @@ success, types, } from "$lib/utils"; + import { fiat } from "$lib/store"; import Avatar from "$comp/Avatar.svelte"; import { format } from "date-fns"; import { PUBLIC_EXPLORER as expl } from "$env/static/public"; @@ -40,7 +41,11 @@ <div> <span class="text-lg text-secondary">Amount</span> <div> - {f(toFiat(a, rate), currency)} + {#if $fiat} + {f(toFiat(a, rate), currency)} + {:else} + {s(a)} + {/if} </div> </div> @@ -48,7 +53,11 @@ <div> <span class="text-lg text-secondary">Tip</span> <div> - {f(toFiat(tip, rate), currency)} + {#if $fiat} + {f(toFiat(tip, rate), currency)} + {:else} + {s(tip)} + {/if} ({Math.round((tip * 100) / Math.abs(a))}%) </div> </div> @@ -56,7 +65,11 @@ <div> <span class="text-lg text-secondary">Total</span> <div> - {f(toFiat(a + (tip || 0), rate), currency)} + {#if $fiat} + {f(toFiat(a + (tip || 0), rate), currency)} + {:else} + {s(a + (tip || 0))} + {/if} </div> </div> {/if} |
